04. Programming Languages
L6 06 Programming Languages
Notes about Programming Languages
Any programming language will have both strong points and weaknesses. A strongpoint for C++ is the ability to write high-speed software with many input-output operations. On the other hand, C++ will allow you to store a floating-point number in a boolean variable. And C++ does not provide much in terms of run-time error checking.
The MISRA C++ standard discusses a subset of C++ that is appropriate to safety critical applications. The standard contains a set of rules for how to use the C++ language in automotive applications.
Software Tools & Software Tool Confidence Level
Automotive software engineers use a variety of tools to help develop software.
Compilers are one example of software tools. Other examples include version control software, testing tools, graphical modeling tools that automatically generate code, and tools to help ensure MISRA compliance.
The functional safety standard requires that you qualify software tools to make sure they are appropriate for safety critical applications; it is becoming more common to use software tools that automate code generation and code testing. If a testing tool has a problem, for example, then code errors could go undetected.
ISO 26262 describes a metric for measuring your confidence in your tools. The metric is called tool confidence level or TCL.
Evaluating confidence levels takes into account two things:
- Tool Impact (TI) - Whether the tool itself could malfunction and violate a safety goal
- Tool Error Detection Capability (TD) - If the tool malfunctions, is the malfunction detected or stopped
You can then use the TI and TD metrics to calculate a tool's confidence level.Software blocks with higher ASIL require TCL1, which is the highest confidence. TCL3 is the lowest confidence rating.
Lower confidence tools with TCL2 and 3 ratings need to be qualified. Qualifying involves running the tool through rigorous testing to prove that it does not cause any errors. Software tool vendors provide qualification kits that help you test their tools in your own environment.